Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

370
Visualizações
docker for windows equivalent for "-v /var/run/docker.sock:/var/run/docker.sock"

I'm trying to control the host docker service from inside a container.

With Linux host and Linux container that is usually done like this: docker run -it -v /var/run/docker.sock:/var/run/docker.sock alpine

I now want to achieve the same with a Docker for Windows host and a Linux container.

If tried quite a lot of things, mostly using DOCKER_HOST with varying IP's like 10.75.0.1:2375 (IP of docker VM), 172.17.0.1:2375 (container IP) and 0.0.0.0:2375 as well as 192.168.178.xxx:2375 (host IP).

But apparently nothing responds on port 2375 or 2376 which I checked with something like: docker run -ti --rm alpine /bin/sh -c "apk add -U nmap && nmap -Pn 10.72.0.1 -p 2375-2376"

At this point I'd like to know if this is even possible with Docker for Windows. Most information I found concerns docker-machine / VirtualBox combinations.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

This works fine when running Linux containers using Docker for Windows too (but not when running Windows containers). Just ensure that your shell won't rewrite paths or similar.

over 4 years ago · Santiago Trujillo Relatório

0

I don't know how SO works so if necroposting is frowned upon then sorry. I also don't use docker on windows but this thread came up during my search for setting up portainer. I figured out the thing that I wanted to figure out and on first login portainer gave me this warning:

 Ensure that you have started the Portainer container with the following Docker flag:
-v "/var/run/docker.sock:/var/run/docker.sock" (Linux).
or
-v \\.\pipe\docker_engine:\\.\pipe\docker_engine (Windows).

So, there you go. Hope that helps.

over 4 years ago · Santiago Trujillo Relatório

0

To complement the answer by @friism:

Just ensure that your shell won't rewrite paths or similar.

This was happening to me within Git Bash on Windows. The solution, in this case, was to prefix all absolute paths with an extra slash (/) to disable the automatic path rewriting done by Git Bash. (Source)

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda